package cn.edu.sdjzu.xg.bysj.domain;


import cn.edu.sdjzu.xg.bysj.security.Actor;
//import cn.edu.sdjzu.xg.bysj.security.User;

import java.io.Serializable;


public final class Teacher extends Actor
		implements Comparable<Teacher>, Serializable{
	private Integer id;
	private String no;
	private String name;

	//属性名为Title，字段名为profTitle
	private String profTitle;

	private Department department;
	private User user;

	public Teacher(Integer id, String no, String name, String profTitle, Department department) {
		this.id = id;
		this.no = no;
		this.name = name;
		this.profTitle = profTitle;
		this.department = department;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	@Override
	public Integer getId() {
		return id;
	}

	@Override
	public void setId(Integer id) {

	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getProfTitle() {
		return profTitle;
	}

	public void setProfTitle(String profTitle) {
		this.profTitle = profTitle;
	}

	@Override
	public String toString() {
		return "Teacher{" +
				"id=" + id +
				", no='" + no + '\'' +
				", name='" + name + '\'' +
				", profTitle='" + profTitle + '\'' +
				", department=" + department +
				", user=" + user +
				'}';
	}

	//	@Override
	public int compareTo(Teacher other) {
		// no为排序依据
		return this.no.compareTo(other.no);
	}
}
